import UIKit

//
@available(iOS 7.0, *)
extension QKC where AA :UIDynamicItemBehavior {
    open func items_qk_g() -> QKC<AA,YY,ZZ, [UIDynamicItem] >{
		 self +^ self.value.items
	}

		// Usually between 0 (inelastic) and 1 (collide elastically)
    open func elasticity_qk_s(_ elasticity:  CGFloat ) -> QKC<AA,YY,ZZ, CGFloat >{
		return link(next: elasticity).then_QK { $0.value.elasticity = elasticity }
	}
    open func elasticity_qk_g() -> QKC<AA,YY,ZZ, CGFloat >{
		 self +^ self.value.elasticity
	}

		// 0 being no friction between objects slide along each other
    open func friction_qk_s(_ friction:  CGFloat ) -> QKC<AA,YY,ZZ, CGFloat >{
		return link(next: friction).then_QK { $0.value.friction = friction }
	}
    open func friction_qk_g() -> QKC<AA,YY,ZZ, CGFloat >{
		 self +^ self.value.friction
	}

		// 1 by default
    open func density_qk_s(_ density:  CGFloat ) -> QKC<AA,YY,ZZ, CGFloat >{
		return link(next: density).then_QK { $0.value.density = density }
	}
    open func density_qk_g() -> QKC<AA,YY,ZZ, CGFloat >{
		 self +^ self.value.density
	}

		// 0: no velocity damping
    open func resistance_qk_s(_ resistance:  CGFloat ) -> QKC<AA,YY,ZZ, CGFloat >{
		return link(next: resistance).then_QK { $0.value.resistance = resistance }
	}
    open func resistance_qk_g() -> QKC<AA,YY,ZZ, CGFloat >{
		 self +^ self.value.resistance
	}

		// 0: no angular velocity damping
    open func angularResistance_qk_s(_ angularResistance:  CGFloat ) -> QKC<AA,YY,ZZ, CGFloat >{
		return link(next: angularResistance).then_QK { $0.value.angularResistance = angularResistance }
	}
    open func angularResistance_qk_g() -> QKC<AA,YY,ZZ, CGFloat >{
		 self +^ self.value.angularResistance
	}

	/**
     Specifies the charge associated with the item behavior. Charge determines the degree to which a dynamic item is affected by
     electric and magnetic fields. Note that this is a unitless quantity, it is up to the developer to
     set charge and field strength appropriately. Defaults to 0.0
     */
    @available(iOS 9.0, *)
    open func charge_qk_s(_ charge:  CGFloat) -> QKC<AA,YY,ZZ, CGFloat>{
		return link(next: charge).then_QK { $0.value.charge = charge }
	}
    @available(iOS 9.0, *)
    open func charge_qk_g() -> QKC<AA,YY,ZZ, CGFloat>{
		 self +^ self.value.charge
	}

	/**
     If an item is anchored, it can participate in collisions, but will not exhibit
     any dynamic response. i.e. The item will behave more like a collision boundary.
     The default is NO
     */
    @available(iOS 9.0, *)
    open func isAnchored_qk_s(_ isAnchored:  Bool) -> QKC<AA,YY,ZZ, Bool>{
		return link(next: isAnchored).then_QK { $0.value.isAnchored = isAnchored }
	}
    @available(iOS 9.0, *)
    open func isAnchored_qk_g() -> QKC<AA,YY,ZZ, Bool>{
		 self +^ self.value.isAnchored
	}

		// force an item to never rotate
    open func allowsRotation_qk_s(_ allowsRotation:  Bool ) -> QKC<AA,YY,ZZ, Bool >{
		return link(next: allowsRotation).then_QK { $0.value.allowsRotation = allowsRotation }
	}
    open func allowsRotation_qk_g() -> QKC<AA,YY,ZZ, Bool >{
		 self +^ self.value.allowsRotation
	}

    open func addItem_qk_f(_ item: UIDynamicItem) -> QKC<AA,YY,ZZ, UIDynamicItem>{
		 self +^ self.value.addItem(item) +^ item
	}

    open func removeItem_qk_f(_ item: UIDynamicItem) -> QKC<AA,YY,ZZ, UIDynamicItem>{
		 self +^ self.value.removeItem(item) +^ item
	}

	// If called before being associated to an animator, the behavior will accumulate values until being associated to an animator
    open func addLinearVelocity_qk_f(_ velocity: CGPoint, for item: UIDynamicItem) -> QKC<AA,YY,ZZ, CGPoint>{
		 self +^ self.value.addLinearVelocity(velocity, for:item) +^ velocity
	}

    open func linearVelocity_qk_f(for item: UIDynamicItem) -> QKC<AA,YY,ZZ,CGPoint>{
		 self +^ self.value.linearVelocity(for:item)
	}

	// If called before being associated to an animator, the behavior will accumulate values until being associated to an animator
    open func addAngularVelocity_qk_f(_ velocity: CGFloat, for item: UIDynamicItem) -> QKC<AA,YY,ZZ, CGFloat>{
		 self +^ self.value.addAngularVelocity(velocity, for:item) +^ velocity
	}

    open func angularVelocity_qk_f(for item: UIDynamicItem) -> QKC<AA,YY,ZZ,CGFloat>{
		 self +^ self.value.angularVelocity(for:item)
	}

}

